(function(){
	if(!window.cell) window.cell={};
	if(!window.cell.prompt) window.cell.prompt={};
	if(!window.$prompt) window.$prompt = cell.prompt = function(obj) {
		if ( window == this || !this.init ){
			return new cell.prompt(obj);
		}
		return this.init(obj);
	}
	cell.prompt.fn = cell.prompt.prototype = {
		svcPrompt:Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService),
		version: "1.0.0",
		init:function(obj){
			var checkstate={value:obj.checkstate};
			var checkmsg=obj.checkmsg;
			var dialogtitle=obj.dialogtitle;
			var text=obj.text;
		
			switch (obj.type){
				case "confirmCheck":
					var flag=$prompt.XPCOM.confirmCheck(null, dialogtitle, text,checkmsg, checkstate);
			//		alert(checkstate.value)
					return {value:flag, state:checkstate.value}
					break
			}
		},
	}
})();
